﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using VisionCloud.Core.Model.Enums;

namespace VisionCloud.Core.Model.Ms
{
    /// <summary>
    /// 点云上传记录表
    /// </summary>
    [Table("MsDotCloudUpload")]
    public class MsDotCloudUpload
    {
        [Key]
        [StringLength(32)]
        public string FileKey { get; set; } // 文件MD5值，作为主键，不可重复

        [Required]
        public Guid TaskId { get; set; } // TaskId

        [Required]
        public MeasureTypeEnum MeasureType { get; set; }

        public DateTime? Begin { get; set; } // 开始上传时间

        public DateTime? End { get; set; } // 结束上传时间

        [StringLength(1000)]
        public string FilePath { get; set; } // 文件路径

        public long? FileSize { get; set; } // 文件大小

        [Required]
        public bool Success { get; set; } // 是否上传成功

        [StringLength(1000)]
        public string Msg { get; set; } // 上传提示信息

        [Required]
        public bool IsDeleted { get; set; } // 是否删除

        public Guid? CreatedBy { get; set; } // 创建人

        public Guid? BatchId { get; set; } // 批次Id

        public DateTime? CreatedTime { get; set; } // 创建时间

        [Required]
        public int PointIndex { get; set; } // 站点

        public int TotalChunks { get; set; } //总分片大小

        public UploadStatusEnum Status { get; set; }

        /// <summary>
        /// 法如型号+序列号
        /// </summary>
        public string Farosn { get; set; }
    }
}